﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Error.ascx.cs" Inherits="PayPal_Error" %>
<%@ Import Namespace="com.paypal.soap.api" %>
<div id="divPaypalError" style="<%= getStyle(PayPalResponse)%>">
    <center>
        <br>
      <b>  <span id="apiheader">PayPal API Error</span></b>
        <br>
        <br>
        <span id="smaller">A PayPal API has returned an error!</span><br>
        <br>
        <table>
            <tr>
                <td>
                    Ack
                </td>
                <td>
                    :
                    <%= PayPalResponse.Ack%>
                </td>
            </tr>
            <tr>
                <td>
                    Version
                </td>
                <td>
                    :
                    <%= PayPalResponse.Version%>
                </td>
            </tr>
            <tr>
                <td>
                    Build
                </td>
                <td>
                    :
                    <%= PayPalResponse.Build%>
                </td>
            </tr>
            <tr>
                <td>
                    CorrelationID
                </td>
                <td>
                    :
                    <%= PayPalResponse.CorrelationID%>
                </td>
            </tr>
            <tr>
                <td>
                    Timestamp
                </td>
                <td>
                    :
                    <%= PayPalResponse.Timestamp%>
                </td>
            </tr>
            <tr>
                <td>
                    Error(s)
                </td>
                <td>
                    <table>
                        <asp:Repeater runat="server" ID="ErrorsRepeater" DataSource='<%#PayPalResponse.Errors%>'>
                            <ItemTemplate>
                                <tr>
                                    <td>
                                        <asp:Literal runat="server" ID="ErrorCodeLiteral" Text='<%#((ErrorType)Container.DataItem).ErrorCode%>'>
                                        </asp:Literal>
                                        -
                                        <asp:Literal runat="server" ID="LongMessageLiteral" Text='<%#((ErrorType)Container.DataItem).LongMessage%>'>
                                        </asp:Literal>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </table>
                </td>
            </tr>
        </table>
    </center>
</div>
